package com.ysstech.etfmanage.feign;


import com.ysstech.etfmanage.feign.entity.FuturesDealDetailed;
import com.ysstech.etfmanage.feign.entity.Quotation;
import com.ysstech.etfmanage.feign.entity.SecuritiesDealDetailed;
import com.ysstech.etfmanage.feign.entity.StockDealDetailed;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(name = "yss-valuation", fallback = FeignValuationServiceFallback.class)
public interface FeignValuationService {

    /**
     * 获台ETF账数据当天的细交易数据 股票类
     * 关联台账表没有清算完成的
     *
     * @param stockDealDetailed
     * @return
     */
    @RequestMapping(value = "/stockDealDetailed/queryStockDealDetailed", method = RequestMethod.POST)
    Map<String, List<SecuritiesDealDetailed>> queryStockDealDetailed(@RequestBody StockDealDetailed stockDealDetailed);

    /**
     * 获台ETF账数据当天的细交易数据 期货类
     * 关联台账表没有清算完成的
     *
     * @param futuresDealDetailed
     * @return
     */
    @RequestMapping(value = "/futuresDealDetailed/queryFuturesDealDetailed", method = RequestMethod.POST)
    public Map<String, List<SecuritiesDealDetailed>> queryFuturesDealDetailed(@RequestBody   FuturesDealDetailed futuresDealDetailed);

    /**
     * 获取一天的行情信息
     *
     * @param fdate
     * @return
     */
    @RequestMapping(value = "/quotation/queryQuotationCache", method = RequestMethod.POST)
    public Map<String, List<Quotation>> queryQuotationCache(@RequestParam("fdate") String fdate);
}
